package com.huawei.esdk.tp.domain.model;

import java.util.Date;

import com.huawei.esdk.platform.common.SDKErrorCode;
import com.huawei.esdk.platform.common.SDKResult;
import com.huawei.esdk.platform.common.exception.SDKException;
import com.huawei.esdk.platform.exception.ProtocolAdapterException;
import com.huawei.esdk.tp.common.constants.TPConstant;
import com.huawei.esdk.tp.device.smc.IConferenceManagerCapability;

/**
 * 周期性会议中的一次会议
 * 
 * @author j00160659
 * 
 */
public class PeriodicalConfInstance extends ScheduleConference {

	public PeriodicalConfInstance(PeriodicalConference conf) {
		super(conf.getId());
	}
	
	public PeriodicalConfInstance(String confID){
	    super(confID);
	}

	////////////////////////////////////////////////////////////////////
	
	@Override
	public SDKErrorCode prolong(String confId, Date beginDate,Integer prolongMinutes) {
		return new SDKErrorCode();
	}

	@Override
    public SDKResult<ScheduleConference> addSite(Site site, boolean useAnonymousSite) throws SDKException {
        IConferenceManagerCapability conferenceManager = getDeviceManager()
                .getDeviceServiceProxy(TPConstant.DEV_ID_SMC, IConferenceManagerCapability.class);
        return conferenceManager.addSite(this.getId(), site, this.getBeginTime(), useAnonymousSite);
    }
	
	
	/**
	 * 取消已预订的周期性会议中指定的某次会议
	 * 
	 * @return
	 * @see SMC:DeleteScheduledConf
	 */
	public SDKErrorCode cancel() {
		return new SDKErrorCode();
	}

	/**
	 * 延长已预订的周期性会议中指定的某次会议
	 * 
	 * @param prolongMinutes
	 * @return
	 * @see SMC:ProlongScheduledConf
	 */
	public SDKErrorCode prolongScheduleConfSMC(Integer confId,
			Integer prolongMinutes) throws ProtocolAdapterException {
		return new SDKErrorCode();
	}

	/**
	 * 修改已预订的周期性会议中指定的某次会议
	 * 
	 * @return　调度成功后的会议
	 * @see SMC:EditFutureConf
	 */
	public SDKResult<ScheduleConference> reschedule() {
		return new SDKResult<ScheduleConference>();
	}
}
